//
//  BoxCostHeadView.m
//  111
//
//  Created by longma on 2018/10/8.
//  Copyright © 2018年 XLH. All rights reserved.
//

#import "MJUIGradientView.h"


@implementation MJUIGradientView


- (void)awakeFromNib{
    [super  awakeFromNib];

   
}

- (void)layoutSubviews{
    [super layoutSubviews];

    [self.superview layoutIfNeeded];
  
    if(self.itemType == 0){

        [self mj_gradientLayerWithColors:@[(id)UIColor.mj_appColor.CGColor,(id)UIColor.mj_backgroundColor.CGColor] startPoint:CGPointMake(0, 0) endPoint:CGPointMake(0, 1)];
        
    }
    
    if(self.itemType == 1){

        [self mj_gradientLayerWithColors:@[(id)MJUIColorFromHex(0xFFFFFF).CGColor,(id)MJUIColorFromHex(0xE1F6F8).CGColor] startPoint:CGPointMake(0, 0) endPoint:CGPointMake(0, 1)];
        
    }
   
    if(self.itemType == 6){

        [self mj_gradientLayerWithColors:@[(id)MJUIColorFromHex(0x4D76F1).CGColor,(id)MJUIColorFromHex(0x9BDCE8).CGColor] startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0) locations:@[@0.5, @1.0]];
        
    }
    
    if(self.itemType == 10){
        [self mj_gradientLayerWithColors:@[(id)MJUIColorFromHex(0xFFFFFF).CGColor,(id)MJUIColorFromHex(0xD3E3F6).CGColor] startPoint:CGPointMake(0, 0) endPoint:CGPointMake(0, 1)];
        
    }
    if(self.itemType == 11){
        [self mj_gradientLayerWithColors:@[(id)MJUIColorFromHex(0xFFFFFF).CGColor,(id)MJUIColorFromHex(0xD4F1F1).CGColor] startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)];
    }
    if(self.itemType == 12){
        [self mj_gradientLayerWithColors:@[(id)MJUIColorFromHex(0xFFFFFF).CGColor,(id)MJUIColorFromHex(0xFAECF6).CGColor] startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)];
    }
    if(self.itemType == 13){
        [self mj_gradientLayerWithColors:@[(id)MJUIColorFromHex(0xFFFFFF).CGColor,(id)MJUIColorFromHex(0xFDD0C2).CGColor] startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)];
    }
    if(self.itemType == 14){
        [self mj_gradientLayerWithColors:@[(id)MJUIColorFromHex(0xFFFFFF).CGColor,(id)MJUIColorFromHex(0xE0E7FF).CGColor] startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)];
    }
   
}

@end
